// member 个人会员相关
import { post } from '@/api/http'

// 供应商列表
const member = {
  // 企业列表
  member_clientInfo: {
    label: 'clientName',
    keyword: 'clientNameLike',
    key: 'id',
    mode: 'each',
    data: {
      pageNumber: 1,
      pageSize: 100,
    },
    api: (data: any) => post({ url: '/clientInfo/findByClientName', data }),
  },
  // 个人会员列表
  member_list: {
    label: 'memberName',
    optionFn: (item: any) => {
      return item.memberName + ' ' + item.phone
    },
    keyword: 'memberNamePhoneLike',
    key: 'id',
    mode: 'each',
    api: (data: any) => post({ url: '/czcCustMember/findQuery', data }),
  },
  // 个人会员列表
  member_list_label: {
    label: 'memberName',
    labelFn: (item: any) => {
      return item.memberName + ' ' + item.phone
    },
    optionFn: (item: any) => {
      return item.memberName + ' ' + item.phone
    },
    keyword: 'memberNamePhoneLike',
    key: 'id',
    mode: 'each',
    api: (data: any) => post({ url: '/czcCustMember/findOrderQuery', data }),
  },
}

export default {
  ...member,
}
